<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <link rel="stylesheet" href="./lib/mui/css/mui.min.css" />
    <link
      rel="stylesheet"
      href="./lib/font-awesome-4.7.0/css/font-awesome.min.css"
    />
    <link rel="stylesheet" href="./css/common.css" />
    <link rel="stylesheet" href="./css/search.css" />
    <title>Document</title>
  </head>
  <body>
    <!-- 全屏容器 -->
    <div class="lt-container">
      <!-- 头部 -->
      <div class="lt-header">
        <!-- 定义a链接返回上一页 -->
        <a href="javascript:history.go(-1);" class="home"
          ><i class="mui mui-icon mui-icon-arrowleft"></i
        ></a>
        <h4>商品搜索</h4>
      </div>
      <!-- 主体 -->
      <div class="lt-main">
        <!-- 登录悬浮按钮 -->
        <div class="lt-login-ball">
          <a href="./login.html"
            ><i class="mui-icon mui-icon-contact"></i><p>登录</p></a
          >
        </div>
        <!-- 区域滚动 -->
        <div class="mui-scroll-wrapper">
          <div class="mui-scroll">
            <!--这里放置真实显示的DOM内容-->
            <!-- 搜索栏 -->
            <div class="lt-search">
              <input
                type="text"
                class="search-txt"
                placeholder="请输入搜索内容"
              />
              <button class="mui mui-btn mui-btn-danger search-btn"
                >搜索</button
              >
            </div>
            <!-- 排序模块 -->
            <div class="lt_sort">
              <a href="#">上架时间 <i class="fa fa-angle-down"></i></a>
              <a href="#" data-type="price"
                >价格 <i class="fa fa-angle-down"></i
              ></a>
              <a href="#" data-type="num"
                >库存 <i class="fa fa-angle-down"></i
              ></a>
              <a href="#">折扣 <i class="fa fa-angle-down"></i></a>
            </div>

            <!-- 产品区域 -->
            <div class="lt_product">
              <!-- 挖了个坑 -->
              <!-- <div class="loading"></div> -->
            </div>
          </div>
        </div>
      </div>
      <!-- 底部 -->
      <div class="lt-footer">
        <ul class="lt-nav mui-clearfix">
          <li>
            <a href="./index.html"><i class="fa fa-home"></i><p>首页</p></a>
          </li>
          <li>
            <a href="list.html"><i class="fa fa-list"></i><p>分类</p></a>
          </li>
          <li>
            <a href="cart.html"><i class="fa fa-cart-plus"></i><p>购物车</p></a>
          </li>
          <li>
            <a href="user.html"
              ><i class="mui mui-icon mui-icon-contact"></i><p>个人中心</p></a
            >
          </li>
        </ul>
      </div>
    </div>
    <script type="text/html" id="tmp">
      {{ if data.length ==0    }}
      <p>暂无该商品信息</p>
      {{ else }}
      <ul>
        {{ each data v i }}
        <li class="lt_product_item">
          <a href="product.html?productId={{ v.id }}">
            <img src="{{ v.pic[0].picAddr }}" alt="">
            <p class="info mui-ellipsis-2">{{ v.proName }}</p>
            <p>
              <span class="price">¥{{ v.price }}</span>
              <span class="oldPrice">¥{{ v.oldPrice }}</span>
            </p>
            <button class="mui-btn mui-btn-primary">立即购买</button>
          </a>
        </li>
        {{ /each }}
      </ul>
      {{/if}}
    </script>
    <script src="./lib/zepto/zepto.min.js"></script>
    <script src="./lib/mui/js/mui.js"></script>
    <script src="./lib/artTemplate/template-web.js"></script>
    <script src="./js/common.js"></script>
    <script src="./js/searchList.js"></script>
  </body>
</html>
